package com.example.test.springdemo.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;

@ApiModel(value = "用户登录日志记录表")
public class UserLoginLog implements Serializable {
    @ApiModelProperty(value = "主键",dataType = "Long")
    private Long id;

    @ApiModelProperty(value = "用户id，关联用户表建索引",dataType = "Long")
    private Long userId;

    @ApiModelProperty(value = "用户名",dataType = "String")
    private String userName;

    @ApiModelProperty(value = "登录ip",dataType = "String")
    private String ip;

    @ApiModelProperty(value = "登录城市",dataType = "String")
    private String loginAddress;

    @ApiModelProperty(value = "登录尝试次数",dataType = "Short")
    private Short loginTryCount;

    @ApiModelProperty(value = "登录时间",dataType = "Date")
    private Date loginDate;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getLoginAddress() {
        return loginAddress;
    }

    public void setLoginAddress(String loginAddress) {
        this.loginAddress = loginAddress;
    }

    public Short getLoginTryCount() {
        return loginTryCount;
    }

    public void setLoginTryCount(Short loginTryCount) {
        this.loginTryCount = loginTryCount;
    }

    public Date getLoginDate() {
        return loginDate;
    }

    public void setLoginDate(Date loginDate) {
        this.loginDate = loginDate;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", userName=").append(userName);
        sb.append(", ip=").append(ip);
        sb.append(", loginAddress=").append(loginAddress);
        sb.append(", loginTryCount=").append(loginTryCount);
        sb.append(", loginDate=").append(loginDate);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
